package com.jie.springwebapp.service.impl;

import com.jie.springwebapp.dao.EmpDao;
import com.jie.springwebapp.pojo.Emp;
import com.jie.springwebapp.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class EmpServiceA implements EmpService {
    @Autowired
    private EmpDao empDao;
    @Override
    public List<Emp> listEmp() {
        List<Emp> empList = empDao.listEmp();
        // 逻辑处理
        for (int i = 0; i < empList.size(); i++) {
            if(empList.get(i).getAge()>=20) {
                System.out.println(empList.get(i).toString());
            }
        }
        // 逻辑处理
        return empList;
    }
}
